package  cn.copera.dyy.common.utils.filter.builder;

public class SimpleField implements Field {
	private String name, value, relational, dataType, logical,parameter,type;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public String getLogical() {
		return logical;
	}

	public void setLogical(String logical) {
		this.logical = logical;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRelational() {
		return relational;
	}

	public void setRelational(String relational) {
		this.relational = relational;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getParameter() {
		return parameter;
	}

	public void setParameter(String parameter) {
		this.parameter = parameter;
	}

	public String getSql() {
		if (name == null || value == null || relational == null)
			return null;

		StringBuffer sb = new StringBuffer();
        if(!name.equals("serialVersionUID")){
        	sb.append(name).append(BuildFilterBean.relationals.get(relational)).append(":"+parameter);
    		
        }
		

		return sb.toString();
	}
}
